<div class="comments">
    <section class="comments-list">
        <!--留言  -->
        {foreach name="data" item="message"}
        <div class="comment">
            <a href="javascript:void(0)" class="avatar">
                    <img src="{$message.avatar}" alt="{$message.nickname}">
                </a>
            <div class="content">
                <div class="pull-right text-muted">{$message.create_time}</div>
                <div><a href="javascript:void(0)"><span class="commenter">{$message.nickname}</span></a></div>
                <div class="text">{$message.content}</div>
            </div>
            {notempty name="message.reply"}
            <div class="comments-list">
                <!--站长回复留言  -->
                <div class="comment">
                    <a href="javascript:void(0)" class="avatar">
                                <img src="{$other_info.avatar|default='__UPLOAD__/default_avatar.png'}" alt="{$other_info.name|default='站长'}">
                            </a>
                    <div class="content">
                        <div class="pull-right text-muted">{$message.reply_time|word_time}</div>
                        <div><a href="javascript:void(0)"><span class="commenter">{$other_info.name|default='站长'}</span></a>
                            <span class="text-muted">回复</span>
                            <a href="javascript:void(0)"><span class="commented">{$message.nickname}</span></a>
                        </div>
                        <div class="text">{$message.reply}</div>
                    </div>
                </div>
            </div>
            {/notempty}
        </div>
        {/foreach}
    </section>
    {empty name="Think.session.user"}
    <footer>
        <div class="reply-form" id="commentReplyForm">
            <a href="javascript:void(0)" class="avatar"><img src="__UPLOAD__/default_avatar.png" alt=""></a>
            <form class="form">
                <div class="form-group">
                    <textarea class="form-control new-comment-text" name="content" rows="2" placeholder="撰写留言..."></textarea>
                </div>
                <div class="form-group comment-user">
                    <div class="row">
                        <div class="col-sm-2">
                            <a href="{:url('index/action/login')}" class="btn btn-block btn-outline btn-primary">登录后留言</a>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </footer>
    {else/}
    <footer>
        <div class="reply-form" id="commentReplyForm">
            <a href="javascript:void(0)" class="avatar"><img src="{$Think.session.user.avatar|default='__UPLOAD__/default_avatar.png'}" alt="{$Think.session.user.nickname}"></a>
            <form class="form" id="messageForm">
                <div class="form-group">
                    <input type="hidden" name="uid" value="{$Think.session.user.id}">
                    <textarea class="form-control new-comment-text" name="content" id="message" rows="2" placeholder="撰写留言..."></textarea>
                </div>
                <div class="form-group comment-user">
                    <div class="row">
                        <div class="col-sm-8">
                            <div class="form-group">
                                <input type="email" name="email" class="form-control" id="email" placeholder="输入电子邮件（不会在留言显示）">
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <button type="submit" class="btn btn-block btn-outline btn-primary">留言</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </footer>
    {/empty}
</div>